package org.example.ioc.controller;

import org.example.ioc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * ClassName: UserController
 * Package: org.example.ioc
 * Description:
 *
 * @Author wanghao
 * @Create 2024-07-05 8:45
 * @Version 1.0
 */
@Controller
public class UserController {

    @Autowired
    @Qualifier("userServiceImpl2")
    private UserService userService;


    public String index() {
        List<String> userList = userService.getUserList();
        userList.forEach(System.out::println);
        return "index";
    }
}
